Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix trunk, set fetch-depth to zero for all workflows #594

Merged
merged 5 commits into from
Jan 18, 2024

Conversation

rriski
Copy link
Contributor

@rriski rriski commented Jan 18, 2024

This PR fixes running the generate action for dependabot PRs such as this one: #593. If the generate action is not run, the generated changes are not included as part of schema updates.

Before

generate

Previously the generate job would fail with:

✖ Unable to detect an upstream commit on this branch: Unable to detect a trunk branch such as 'main'. Checked the following - refs/remotes/origin/HEAD, refs/remotes/origin/main, refs/remotes/origin/master, main, master. See https://docs.trunk.io/docs/reference-trunk-yaml#repo for more information
make: *** [Makefile:112: fmt] Error 2" see e.g. https://github.com/aiven/aiven-operator/actions/runs/7535434909/job/20511411022

lint

trunk could fail to post annotations with the following error:

✖ Failed to post annotations to github: GitHub Error:403 Body:{"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/checks/runs#create-a-check-run"}
Error: Process completed with exit code 1.

After

Both generate and lint succeed where they previously failed.

@rriski rriski requested a review from a team January 18, 2024 10:59
@rriski rriski force-pushed the rriski-fix-trunk branch 2 times, most recently from ee1cc93 to 4726b4a Compare January 18, 2024 11:23
    ✖ Failed to post annotations to github: GitHub Error:403 Body:
    {"message":"Resource not accessible by integration","documentation_url":
    "https://docs.github.com/rest/checks/runs#create-a-check-run"}
    Error: Process completed with exit code 1.
@rriski rriski closed this Jan 18, 2024
@rriski rriski reopened this Jan 18, 2024
@rriski rriski changed the title ci: use official trunk action in generate job ci: fix trunk annotation and running trunk in the generate action Jan 18, 2024
@rriski rriski changed the title ci: fix trunk annotation and running trunk in the generate action ci: fix trunk Jan 18, 2024
@rriski rriski force-pushed the rriski-fix-trunk branch 3 times, most recently from 403f3b4 to e7ce251 Compare January 18, 2024 11:54
.github/workflows/lint.yml Show resolved Hide resolved
.github/workflows/generate.yml Show resolved Hide resolved
@Serpentiel Serpentiel changed the title ci: fix trunk ci: fix trunk, set fetch-depth to zero for all workflows Jan 18, 2024
@Serpentiel Serpentiel self-assigned this Jan 18, 2024
@Serpentiel Serpentiel added the enhancement New feature or request label Jan 18, 2024
Copy link
Contributor

@Serpentiel Serpentiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Serpentiel Serpentiel merged commit ae0617c into main Jan 18, 2024
7 checks passed
@Serpentiel Serpentiel deleted the rriski-fix-trunk branch January 18, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants